<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Flexbox 水平居中</title>
    <style>
        .big-div {
            display: flex;
            justify-content: center;
            /* border: 1px solid #ccc; */
            padding: 10px;
        }

        .small-div {
            width: 50px;
            height: 50px;
            background-color: lightblue;
            margin: 0 5px;
        }
    </style>
</head>

<body>
    <div class="big-div">
        <div class="small-div"></div>
        <div class="small-div"></div>
        <div class="small-div"></div>
    </div>
</body>

</html>    